/* This program is free and opensource software 
 * under the MIT License. */

#include <stdio.h>
#include <stdlib.h>

/* Variable Declaration */
int run=0;

/* The Main Function, set up to accept Command LLine Arguments */ 
int main(int argc, char *argv[])
{
	while(run != 1) /* The main while loop */
	{
	printf("Welcome to Unix \n"); 
	printf("\n");
	printf("Menu: \n");
	printf("1. Run Vim \n");
	printf("2. Calender \n");
	printf("3. Date \n");
	printf("4. Exit \n");
	printf("Selection: \n");
	scanf("%d",&run);
		switch (run)
		{
		/* This is the menu selection code */
		case 1:
			/* Run Vim */
			system("vim");
		break;
		case 2:
			/* Show Calender */
			system("cal");
		break;
		case 3:
			/* Show Time */
			system("date");
		break;
		case 4:
			/* Quit Program */
			run = 1;
		break;
		default:
			/* Error Code */
			printf("Error. \n");
			run = 1;
		break;
		}


		}
	return 0;
	}

